package com.awifi.dbus.controller;

import com.awifi.dbus.dao.DevbusAccollectVendorMapper;
import com.awifi.dbus.model.DevbusAccollectVendor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Date;

/**
 * Created by yhy on 17-5-29.
 * 测试 springmvc 和 mybatis 好不好用
 */

@Controller
public class TestController {
    @Autowired
    private DevbusAccollectVendorMapper devbusAccollectVendorMapper;

    @RequestMapping("/hello")
    @ResponseBody
    String hello() {
        DevbusAccollectVendor vendor = new DevbusAccollectVendor();
        vendor.setName("TEST");
        vendor.setCreatetime(new Date());
        devbusAccollectVendorMapper.insert(vendor);
        return "hello world";
    }
}
